Fix up abi checking
authorMatthias Clasen <mclasen@redhat.com>
Mon, 7 Jun 2010 10:16:21 +0000 (06:16 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 7 Jun 2010 10:16:21 +0000 (06:16 -0400)
The abicheck script was hardcoding assumptions about XI2 being used,
making it fail on e.g. RHEL5.

gdk/abicheck.sh
gdk/gdk.symbols
gdk/makegdkalias.pl
gdk/x11/gdkdevicemanager-xi.c
gdk/x11/gdkdevicemanager-xi.h
gdk/x11/gdkdevicemanager-xi2.h

index bd35405b96481a8540729682fe94860c6b275018..422cee9a240f7033ebf358b830c312f992182a82 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
 
-cpp -DINCLUDE_VARIABLES -P -DALL_FILES -DGDK_ENABLE_BROKEN -DGDK_WINDOWING_X11 ${srcdir:-.}/gdk.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' | sort | uniq > expected-abi
+cpp -DINCLUDE_VARIABLES -P -DALL_FILES -DGDK_ENABLE_BROKEN -include ${srcdir:-.}/../config.h -include ${srcdir:-.}/gdkconfig.h ${srcdir:-.}/gdk.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' | sort | uniq > expected-abi
 nm -D -g --defined-only .libs/libgdk-x11-3.0.so | cut -d ' ' -f 3 | egrep -v '^(__bss_start|_edata|_end)' | sort > actual-abi
 diff -u expected-abi actual-abi && rm -f expected-abi actual-abi
index 971bc61a460f8bc95fb652bdeca9447e8b2068ca..35676067cf004fa2eaaaaba0884f4a924cca002d 100644 (file)
@@ -90,10 +90,22 @@ gdk_device_manager_core_get_type
 #if IN_HEADER(__GDK_DEVICE_MANAGER_XI2_H__)
 #if IN_FILE(__GDK_DEVICE_MANAGER_XI2_C__)
 #ifdef GDK_WINDOWING_X11
+#ifdef XINPUT_2
 gdk_device_manager_xi2_get_type
 #endif
 #endif
 #endif
+#endif
+
+#if IN_HEADER(__GDK_DEVICE_MANAGER_XI_H__)
+#if IN_FILE(__GDK_DEVICE_MANAGER_XI_C__)
+#ifdef GDK_WINDOWING_X11
+#ifdef XINPUT_XFREE
+gdk_device_manager_xi_get_type
+#endif
+#endif
+#endif
+#endif
 
 #if IN_HEADER(__GDK_H__)
 #if IN_FILE(__GDK_MAIN_X11_C__)
index 8f0665dd9747c7e52a5c41877433335af2f3898a..02ba61d76d735ecbce56137ebbd5912b5ed5f009 100755 (executable)
@@ -83,7 +83,7 @@ while (<>) {
       next;
   }
 
-  if ($_ =~ /^\#ifn?def\s+G/)
+  if ($_ =~ /^\#ifn?def/)
   {
       print $_;
       
index e11cb58a6b31c84bb434f6dabc888ac334a03625..61907994f8b4f204a0a93dc8dbf78831fbe6e042 100644 (file)
@@ -25,6 +25,8 @@
 #include "gdkintl.h"
 #include "gdkx.h"
 
+#include "gdkalias.h"
+
 #include <X11/extensions/XInput.h>
 
 
@@ -654,3 +656,6 @@ gdk_device_manager_xi_list_devices (GdkDeviceManager *device_manager,
   else
     return NULL;
 }
+
+#define __GDK_DEVICE_MANAGER_XI_C__
+#include "gdkaliasdef.c"
index 6fd7d6dc730cb2269af47b5c761c7b4be140e1f0..e2028fdb8da982ee1c2a2938251de9924e3b5229 100644 (file)
@@ -50,7 +50,6 @@ struct _GdkDeviceManagerXIClass
   GdkDeviceManagerCoreClass parent_class;
 };
 
-G_GNUC_INTERNAL
 GType gdk_device_manager_xi_get_type (void) G_GNUC_CONST;
 
 G_END_DECLS
index d47bcdb16ab2cd93fc9d5694ed6b342e37a6cf0e..828aec3f48c90b72cfd48223417f0b8f4d577d6e 100644 (file)
@@ -58,4 +58,4 @@ GType gdk_device_manager_xi2_get_type (void) G_GNUC_CONST;
 
 G_END_DECLS
 
-#endif /* __GDK_DEVICE_MANAGER_CORE_H__ */
+#endif /* __GDK_DEVICE_MANAGER_XI2_H__ */